#ifndef _ROOM_MGR_HPP
#define _ROOM_MGR_HPP
#include <cstdint>
#include <memory>
#include <unordered_map>
#include "RoomBase.hpp"
#include "Player.hpp"
#include "arena.h"
#include "cs.pb.h"
#include "sc.pb.h"
#include "Singleton.hpp"
class RoomMgr
{
public:
    friend class Singleton<RoomMgr>;
public:
    RoomBase* CreateRoom(ROOM_TYPE type);
public:
    // recv msg from client
    int PlayerCreateRoom(std::shared_ptr<Player> player, const cs::CreateRoomReq& msg);
private:
    std::unordered_map<uint64_t, RoomBase*> _rooms;
};
#endif